#pragma once
#include "prio_assign.h"

class LPA: public PriorityAssignAlgorithm {
public:
    LPA(flow *flows) : PriorityAssignAlgorithm(flows) {}
    ~LPA() = default;
	void run() override;
	void debug_flows() override;
private:
    void assign_flow(int id, int priority, bool move_from_unassign = true, bool is_scheduled = true);
    void Reassign_priority(int flow_id, int new_priority, u64 cost);
	void LPR();
	u64 min_cost, average_load;
	int queue_num;
	vector<vector<int>> map_queue;
	vector<u64> queue_load;
};